package com.food.dao.service;

import java.util.List;

import com.food.dao.FoodsaveDAOJdbc;
import com.food.dao.in.FoodsaveDAO;
import com.food.model.Foodsave;

public class FoodsaveService {
	private FoodsaveDAO dao = new FoodsaveDAOJdbc();
	public void insertFoodsave(Foodsave bean){
		if(bean!=null){
			dao.insertFoodsave(bean);
		}
	}
	public void updateFoodsave(Foodsave bean){
		if(bean!=null){
			dao.updateFoodsave(bean.getRid(), bean.getFsid(), bean.getFoodsaveid());
		}
	}
	public void deleteFoodsave(Foodsave bean){
		if(bean!=null){
			dao.deleteFoodsave(bean.getFoodsaveid());
		}
	}
	public List<Foodsave> findFoodsaveByRecipe(Foodsave bean){
		return dao.findFoodsaveByRecipe(bean.getRid());
	}
	public List<Foodsave> findFoodsaveByFoodsearch(Foodsave bean){
		return dao.findFoodsaveByFoodsearch(bean.getFsid());
	}
}
